<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>从一个支持的历法转变为Julian Day计数。</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.cal-info.html">cal_info</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.easter-date.html">easter_date</a></div>
 <div class="up"><a href="ref.calendar.html">Calendar 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.cal-to-jd" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">cal_to_jd</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5)</p><p class="refpurpose"><span class="refname">cal_to_jd</span> &mdash; <span class="dc-title">从一个支持的历法转变为Julian Day计数。</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.cal-to-jd-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>cal_to_jd</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$calendar</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$month</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$day</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$year</code></span>
   )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>cal_to_jd()</strong></span>函数从一个给定的历法日期计算出Julian天数，支持的历法有 <strong><code>CAL_GREGORIAN</code></strong>，<strong><code>CAL_JULIAN</code></strong>，<strong><code>CAL_JEWISH</code></strong>和<strong><code>CAL_FRENCH</code></strong>。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.cal-to-jd-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">calendar</code></em></dt>

     <dd>

      <p class="para">
       选定的历法，可以是<strong><code>CAL_GREGORIAN</code></strong>，<strong><code>CAL_JULIAN</code></strong>，<strong><code>CAL_JEWISH</code></strong>或<strong><code>CAL_FRENCH</code></strong>中的某一个。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">month</code></em></dt>

     <dd>

      <p class="para">
       数字形式的月份，根据选定的<em><code class="parameter">calendar</code></em>历法来确定范围。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">day</code></em></dt>

     <dd>

      <p class="para">
       数字形式的日期，根据选定的<em><code class="parameter">calendar</code></em>历法来确定范围。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">year</code></em></dt>

     <dd>

      <p class="para">
       数字形式的年份，根据选定的<em><code class="parameter">calendar</code></em>历法来确定范围。
      </p>
     </dd>

      
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.cal-to-jd-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   一个Julian天数。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.cal-to-jd-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.cal-from-jd.html" class="function" rel="rdfs-seeAlso">cal_from_jd()</a> - 转换Julian Day计数到一个支持的历法。</span></li>
    <li class="member"><span class="function"><a href="function.frenchtojd.html" class="function" rel="rdfs-seeAlso">frenchtojd()</a> - 从一个French Republican历法的日期得到Julian Day计数。</span></li> 
    <li class="member"><span class="function"><a href="function.gregoriantojd.html" class="function" rel="rdfs-seeAlso">gregoriantojd()</a> - 转变一个Gregorian历法日期到Julian Day计数</span></li>  
    <li class="member"><span class="function"><a href="function.jewishtojd.html" class="function" rel="rdfs-seeAlso">jewishtojd()</a> - 转变一个Jewish历法的日期为一个Julian Day计数</span></li>  
    <li class="member"><span class="function"><a href="function.juliantojd.html" class="function" rel="rdfs-seeAlso">juliantojd()</a> - 转变一个Julian历法的日期为Julian Day计数</span></li>  
    <li class="member"><span class="function"><a href="function.unixtojd.html" class="function" rel="rdfs-seeAlso">unixtojd()</a> - 转变Unix时间戳为Julian Day计数</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.cal-info.html">cal_info</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.easter-date.html">easter_date</a></div>
 <div class="up"><a href="ref.calendar.html">Calendar 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
